package countConsistentStrings;

public class Solution {
    public int countConsistentStrings(String allowed, String[] words) {
        int ans = 0;
        for (String s: words) {
            boolean bol = true;
            for (int i = 0; i < s.length(); i++) {
                if(!allowed.contains(s.charAt(i)+"")){
                    bol = false;
                    break;
                }
            }
            if(bol){
                ans++;
            }
        }
        return ans;
    }
}
